home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Tools - Objects / Virtual User 1.0 / Virtual User / MPW Scripts / PickTargetZone_vu < prev    next >
Text File  |  1991-01-25  |  1KB  |  49 lines

  1. #
  2. #    File:        PickTarget_vu
  3. #
  4. #    Contains:    This script lets the user pick a target zone through a simple dialog.
  5. #                It searches for all accessible zones and collects them in a list.
  6. #                This list is presented to the user and the user is asked to select
  7. #                one of the zone.
  8. #
  9. #
  10. #    Written by:    Chad Williams
  11. #
  12. #    Copyright:    © 1989-91 by Apple Computer, Inc., all rights reserved.
  13. #
  14. #    Change History:
  15. #
  16. #         1/9/91       chad        creation 
  17. #
  18.  
  19. SET Exit 0
  20. SET TempVar ''
  21. SET TargetList "`choose '≈:' -list ≥ "Dev:Null"`" 
  22. IF ("{TargetList}" == '')
  23.     ALERT "∂nThis network has only one zone.∂nThe Target Zone is being set to this zone."
  24.  
  25.     SET VUTargetZone "*"
  26.     TARGET "{VUSettings}"
  27.     FIND 1
  28.     ECHO "*" > §
  29.     CLOSE -y "{VUSettings}"
  30.     EXIT 0
  31. END
  32.  
  33. SET TempVar "`getlistitem -s -q {TargetList} ≥ "Dev:Null"`"
  34.  
  35. IF ("{TempVar}" != '')
  36.     Set Tempzone `Evaluate "{TempVar}" =~ /∂'(≈)®1∂'/`
  37.     IF ({Tempzone} != 0)
  38.         Set Tempzone "{®1}"
  39.     ELSE
  40.         Set Tempzone "{TempVar}"
  41.     END #remove single quotes if present
  42.  
  43.     SET VUTargetZone "{Tempzone}"
  44.     TARGET "{VUSettings}"
  45.     FIND 1
  46.     ECHO "{Tempzone}" > §
  47.     CLOSE -y "{VUSettings}"
  48. END
  49.